const { createApp } = Vue

createApp({
  data() {
    return {
      CurrentUrl: window.location.href,
      BaseUrl: 'http://60.173.236.227:2089/api',
      searchList: [],
    }
  },
  methods: {
    getHotSearch() {
      $.ajax({
        url: this.BaseUrl + `/member/getHotSearch?url=${this.CurrentUrl}`,
        type: 'get',
        dataType: 'jsonp', //=> 执行jsonp请求
        // data: data,
        async: false,
        // jsonp: 'callback',
        success: (res) => {
          // console.log('ok', res);
          if (res.code == 1) {
            this.searchList = res.data
          }
        },
      })
    }
  },
  mounted() {
    this.getHotSearch()
  },

}).mount('#app')